package com.samuel.blog.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.data.annotation.Transient;

import com.samuel.blog.utils.StringUtils;

public class ArticleEntity implements Serializable {

	private static final long serialVersionUID = -7014867725748197288L;

	private String articleId;
	private Date createDate;
	private Date modiftyDate;
	
	private String authorId; // 作者id
	@Transient
	private AuthorEntity author;
	private String title;  // 标题
	private String content; // 内容
	private int status; // 0:发布 1:下架
	private int sort;	// 0:正常 1:热帖 2:精华 3:置顶 排序字段 3最大 同为0的按照时间排序 
	public int getSort() {
		return sort;
	}
	public void setSort(int sort) {
		this.sort = sort;
	}
	private int deleteStatus; // 删除 0: 不删除 1:删除
	private AuthorEntity authorEntity;
	
	
	public String getArticleId() {
		return articleId;
	}
	public void setArticleId(String articleId) {
		this.articleId = articleId;
	}
	public AuthorEntity getAuthorEntity() {
		return authorEntity;
	}
	public void setAuthorEntity(AuthorEntity authorEntity) {
		this.authorEntity = authorEntity;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getModiftyDate() {
		return modiftyDate;
	}
	public void setModiftyDate(Date modiftyDate) {
		this.modiftyDate = modiftyDate;
	}
	public String getAuthorId() {
		return authorId;
	}
	public void setAuthorId(String authorId) {
		this.authorId = authorId;
	}
	public AuthorEntity getAuthor() {
		return author;
	}
	public void setAuthor(AuthorEntity author) {
		this.author = author;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		title = StringUtils.isStr(title);
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		content = StringUtils.isStr(content);
		this.content = content;
	}
	public int getStatus() {
		return status;
	}
	
	public void setStatus(int status) {
		this.status = status;
	}

	public int getDeleteStatus() {
		return deleteStatus;
	}
	public void setDeleteStatus(int deleteStatus) {
		this.deleteStatus = deleteStatus;
	}
	
}
